<?php if(!IS_AJAX){?>

<include file="Public:header" />

<div class="row">
  <div class="col-sm-7 col-md-8 col-lg-9">
    <div class="directory-info-row" style="margin-top:0;">
		<section class="panel">
            <header class="panel-heading custom-tab ">
                <ul class="nav nav-tabs">
                    <li class="active">
                        <a href="#home" data-toggle="tab">通讯录</a>
                    </li>
                </ul>
            </header>
                        
            <style>
                .table-custom{ border:1px solid #ccc; border-collapse:separate; border-radius:5px; overflow:hidden;}
				.table-custom tr{ color:#666;}
				.table-custom thead th{ padding:14px !important; background:linear-gradient(to bottom,#fdfdfd 30%,#e9e9e9); text-align:center;}
				.table-custom tr td{line-height: 36px !important;padding-top: 15px !important;padding-left: 15px !important; border-top:none !important;}
				.table-custom tr img{ border:1px solid #ccc; margin-right:5px;}
				.table-custom tr .social-links{ margin:5px 0;}
            </style>
            <div class="panel-body">
                <div class="tab-content">
                    <div class="tab-pane active " id="home">
                        <table class="table  table-hover general-table table-custom table-striped">
                            <thead>
                                <tr>
                                    <th> 姓名</th>
                                    <th class="hidden-phone">角色</th>
                                    <th>职位</th>
                                    <th>联系电话</th>
                                    <th>QQ</th>
                                    <th>Email</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody class="" id="teamdatalist">
        <?php }?>
        
        <!-- 数据主体 -->
        <volist name="list" id="vo">
        	<tr>
            	<td>
                	<img class="media-object pull-left" width="40" src="<empty name="vo['img_url']">/Public/timg.jpg<else/>{$vo.img_url}</empty>" alt="">
                    <span class="pull-right">{$vo.name}</span>
                </td>
            	<td>{:$groupList[$vo['group_id']]}</td>
                <td>{:$positionList[$vo['position_id']]}</td>
                <td>{$vo.tel}</td>
                <td>{$vo.QQ}</td>
                <td>{$vo.Email}</td>
                <td>
                	<div class="social-links">
                    	<li>
                            <a title="" data-placement="top" data-toggle="tooltip" class="tooltips" href="" data-original-title="他的积分"><i class="fa icon-smile-o"></i></a>
                            <a title="" data-placement="top" data-toggle="tooltip" class="tooltips" href="" data-original-title="给他发信息"><i class="fa icon-comments-o"></i></a>
                            <a title="" data-placement="top" data-toggle="tooltip" class="tooltips" href="javascript:void(0);" onClick="_openWindow('{:U('Info/index',['member_id'=>$vo['id']])}',650,'个人动态','取消',null,'')" data-original-title="他的动态"><i class="fa icon-hand-o-up"></i></a>
                            
                            <a title="" data-placement="top" data-toggle="tooltip" class="tooltips" href="javascript:void(0);" onClick="_openWindow('{:U('Employee/edit',['id'=>$vo['id']])}',650,'修改员工信息','保存',function(){ },'')" data-original-title="他的动态"><i class="fa icon-edit"></i></a>
                            
                        </li>
                    </div>
                </td>
            </tr>
        </volist>
        <!-- 数据主体结束 --> 
        <?php if(!IS_AJAX){?>
        	
			</tbody>
        </table>
                    </div>
                </div>
            </div>
        </section>
    </div>

    <div class="PagesBox" id="teamdatalistpages"><?php echo $pages;?></div>
  </div>
  <div class="col-sm-5 col-md-4 col-lg-3">
    <div class="panel">
      <header class="panel-heading"> 团队人员 </header>
      <div class="panel-body">
      
      
      <form id="teamdatalistform" action="<?php echo U('Employee/index', array('pagesize' => 5));?>">
      
        <div class="input-group m-bot15">
        
        <input type="text" name="keywords" class="form-control">
          <span class="input-group-btn">
          <button type="button" onClick="$('#teamdatalistform').submit();" class="btn btn-default"><i class="fa icon-search"></i></button>
          
          
          
          </span> </div></form>
          
          <hr>
          
        <div id="treeDemo" class="ztree">
          
         
        </div>
      </div>
    </div>
  </div>
</div>
<include file="Public:script" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Js/zTree_v3/css/zTreeStyle/zTreeStyle.css">
	<script type="text/javascript" src="/Public/Js/zTree_v3/js/jquery.ztree.core-3.5.js"></script>
	<script type="text/javascript">
	
	$('#teamdatalist').ajaxlist();
	
	
		var setting = { 
			view: {
				selectedMulti: false
			},
			async: {
				enable: true,
				url:"{:U('membertree',array('id' => $memberInfo['id']))}", 
				autoParam:["id", "name=n", "level=lv"],
				otherParam:{"otherParam":"zTreeAsyncTest"},
				dataFilter: filter
			},
			callback: { 
				beforeClick: beforeClick,
				beforeAsync: beforeAsync,
				onAsyncError: onAsyncError,
				onAsyncSuccess: onAsyncSuccess
			}
		};

		function filter(treeId, parentNode, childNodes) {
			if (!childNodes) return null;
			for (var i=0, l=childNodes.length; i<l; i++) {
				childNodes[i].name = childNodes[i].name.replace(/\.n/g, '.');
			}
			return childNodes;
		}
		function beforeClick(treeId, treeNode) {
			if (!treeNode.isParent) {
				return false;
			} else {
				return true;
			}
		}
		var className = "dark";
		function beforeAsync(treeId, treeNode) {
			className = (className === "dark" ? "":"dark");
			return true;
		}
		function onAsyncError(event, treeId, treeNode, XMLHttpRequest, textStatus, errorThrown) {
			
		}
		function onAsyncSuccess(event, treeId, treeNode, msg) {
			
		}

		$(document).ready(function(){
			$.fn.zTree.init($("#treeDemo"), setting);
		});

		

	</script>
<style>

#treeDemo .highlight_red {color:#A60000;}
#treeDemo .highlight_green {color:#A7F43D;}
#treeDemo li {list-style: circle;font-size: 14px; list-style-type:none; cursor:pointer}
#treeDemo li.title {list-style: none;}
#treeDemo ul.list {margin-left: 17px;}
#treeDemo li a{padding:4px 0;}
#treeDemo div.content_wrap {}
#treeDemo div.content_wrap div.left{}
#treeDemo div.content_wrap div.right{}
#treeDemo div.zTreeDemoBackground {}
#treeDemo li .button{margin-top:3px;}
#treeDemo ul.ztree {margin-top: 10px;border: 1px solid #617775;background: #f0f6e4;overflow-y:scroll;overflow-x:auto;}
#treeDemo ul.log {border: 1px solid #617775;background: #f0f6e4;width:300px;height:170px;overflow: hidden;}
#treeDemo ul.log.small {height:45px;}
#treeDemo ul.log li {color: #666666;list-style: none;padding-left: 10px;}
#treeDemo ul.log li.dark {background-color: #E3E3E3;}

/* ruler */
#treeDemo div.ruler {height:20px; width:220px; background-color:#f0f6e4;border: 1px solid #333; margin-bottom: 5px; cursor: pointer}
#treeDemo div.ruler div.cursor {height:20px; width:30px; background-color:#3C6E31; color:white; text-align: right; padding-right: 5px; cursor: pointer}
#treeDemo{margin-top:0; height:100%;}
#treeDemo .button.ico_close{display:none;}
#treeDemo .button.ico_open,.button.ico_close,.ico_docu{display:none !important;} </style>
</body></html><?php }?>